package com.kiki.song.domain.recommend;
import lombok.Data;

import lombok.Data;

@Data
public class UserActionEvent {
    String userId;       // 用户唯一标识
    String songId;      // 歌曲标识
    String keyword;     // 搜索关键词
    ActionType action;  // (对目标歌曲进行的)行为类型枚举
    long timestamp;     // 事件发生时间

    // 构造方法1：包含 userId, songId, action
    public UserActionEvent(String userId, String songId, ActionType action) {
        this.userId = userId;
        this.songId = songId;
        this.action = action;
        this.timestamp = System.currentTimeMillis();
    }

    // 构造方法2：包含 userId, songId, keyword, action, timestamp
    public UserActionEvent(String userId, String keyword, ActionType action, long timestamp) {
        this.userId = userId;
        this.keyword = keyword;
        this.action = action;
        this.timestamp = timestamp;
    }

    public UserActionEvent() {

    }
}

